﻿using System;
using System.Runtime.Serialization;

namespace LuxDiner.Model.Financial
{
    [DataContract]
    public class BankModel:MBase
    {
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int ID { get; set; }
        [Model]
        [DataMember]
        public string BankName { get; set; }
        [Model]
        [DataMember]
        public string CardNo { get; set; }

        #region Help
        [DataMember]
        public string ShowName
        {
            get
            {
                var ret = BankName;
                if (!string.IsNullOrEmpty(CardNo))
                    ret += " [" + CardNo + "]";
                return ret;
            }
        }
        #endregion
    }

    [DataContract]
    public class BankCollection : ModelCollectionBase<BankModel>{}
}
